/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package game1;

import java.awt.Color;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Line2D;
import java.awt.geom.Rectangle2D;

/**
 *
 * @author Юра
 */
public class Sniper extends Friends {

    public Sniper() {
        super();
        setAnotherPropertis();
    }

    public Sniper(int x, int y) {
        super(x,y);
        setAnotherPropertis();
    }

    public Sniper(int x, int y, Color color) {
        super(x,  y, color);
        setAnotherPropertis();

    }

    public void setAnotherPropertis(){
        rotate_speed = 0.2;
        distance = 150;
        reload_time=30;
        bullet_speed = 20;
    }

    @Override
    public void uniqDraw() {
        img.add(new Line2D.Double(this.place.getX()-r,this.place.getY(),this.place.getX()+this.r*2.8,this.place.getY())); //stvol
        img.add(new Rectangle2D.Double(this.place.getX()-r-1,this.place.getY()-1,this.r+2,2));          // priklad
        img.add(new Rectangle2D.Double(this.place.getX()+r*2.8-2,this.place.getY()-1,1,2));         //mushka
        img.add(new Line2D.Double(this.place.getX()+2,this.place.getY()-2,this.place.getX()+2,this.place.getY()+2)); //stvol
        //img.add(new Rectangle2D.Double(this.place.getX()+2,this.place.getY()-2,0,4));
        img.add(new Ellipse2D.Double(this.place.getX()-r, this.place.getY()-r, this.r*2, this.r*2));
    }

    @Override
    protected void shot() {
        new AePlayWave("c:/Documents and Settings/Юра/Мои документы/NetBeansProjects/Game1/src/game1/sniper.wav").start();
        boollets.add(new Dots(place));
        load++;
    }
}
